﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="WUCComposicionPortafolio.ascx.cs" Inherits="WebUserControls_WUCComposicionPortafolio" %>
<link href="../Styles/SiteEcoGroup.css" rel="stylesheet" type="text/css" />
<style type="text/css">
    .float_left
    {
        float: left;
    }
    
    .float_right
    {
        float: right;
    }
    
    /* Adjust this width to fit your needs */
    .container
    {
        width: 350px;
    }
    
    .container_head
    {
        height: 30px;
        background-image: url(img/sidebar_center.jpg);
    }
    
    /* To Center align the title add: text-align:center; */
    .container_head_text
    {
        height: 23px;
        padding: 7px 0 0 0;
        font-family: Arial, Helvetica, sans-serif;
        color: #666666;
        font-size: 16px;
        font-weight: bold;
    }
    
    .container_content
    {
        background-color:White;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 12px;
        padding: 5px;
        color: #666666;
        border-width: 1px 1px 1px 1px;
        border-spacing: 0px;
        border-style: none solid solid solid;
        border-color: #E7E7E7;
    }
</style>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td width="100%">
            <h4>
                Composición del Portafolio</h4>
            <br />
        </td>
    </tr>
    <tr>
        <td align="center" valign="top" bgcolor="#FFFFFF">
            <br />
            <table width="97%" border="0" cellspacing="1" cellpadding="1">
                <tr>
                    <td width="61%" align="left">
                        <strong>Portafolio:</strong>
                        <asp:Label runat="server" ID="lblAlias"></asp:Label>
                        &nbsp;-
                        <asp:Label runat="server" ID="lblTipo"></asp:Label>
                    </td>
                    <td width="39%" align="left">
                        <strong>Estado de Cuenta del:</strong>
                        <asp:Label runat="server" ID="lblFecha"></asp:Label>
                    </td>
                </tr>
            </table>
            <br />
        </td>
    </tr>
</table>
<br />
<br />
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td width="100%">
                                <table id="TablePosiciones" runat="server" 
    width="100%">
                                    <tr>
                                        <td style="text-align: right">
                                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <asp:LinkButton ID="LbtnVerGrid" runat="server" OnClick="LbtnVerGrid_Click">Ver Resumen</asp:LinkButton>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table width="100%" border="0" cellpadding="0" cellspacing="0" 
                                                class="tabla_verde" bgcolor="#EFEFEF">
                                                <tr>
                                                    <td align="left" class="tabla_verde">
                                                        Filtros
                                                    </td>
                                                </tr>
                                            </table>
                                            <table width="100%" border="0" cellpadding="5" cellspacing="1" 
                                                bgcolor="#CCCCCC">
                                                <tr>
                                                    <td align="left" valign="top" bgcolor="#FFFFFF">
                                                        <table width="100%">
                                                            <tr>
                                                                <td style="width: 5px">
                                                                    &nbsp;
                                                                </td>
                                                                <td style="width: 90px">
                                                                    <strong>Tipo posición:</strong>
                                                                </td>
                                                                <td>
                                                                    <asp:DropDownList ID="ddlTipoPosicion" runat="server" Width="254px">
                                                                        <asp:ListItem Value="0">Sin filtro</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </td>
                                                                <td>
                                                                    <strong>A/P:</strong>
                                                                </td>
                                                                <td>
                                                                    <asp:DropDownList ID="ddlActivoPasivo" runat="server" Width="127px">
                                                                        <asp:ListItem Value="0">Sin filtro</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </td>
                                                                <td>
                                                                    <strong>Divisa:</strong>
                                                                </td>
                                                                <td>
                                                                    <asp:DropDownList ID="ddlDivisa" runat="server" Width="127px">
                                                                        <asp:ListItem Value="0">Sin filtro</asp:ListItem>
                                                                    </asp:DropDownList>
                                                                </td>
                                                                <td >                                                                    
                                                                    <asp:LinkButton ID="lbtnFiltrar" runat="server" OnClick="lbtnFiltrar_Click">Filtrar</asp:LinkButton>                                                                    
                                                                </td>
                                                            </tr>
                                                            </table>
                                                    </td>
                                                </tr>
                                            </table>
                                            <br />
                                            <br />
                                            <br />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:GridView ID="gvActivos" runat="server" AllowSorting="True" AutoGenerateColumns="False"
                                                BackColor="White" BorderColor="#c9ccd3" BorderStyle="None" BorderWidth="1px"
                                                CellPadding="3" GridLines="Horizontal" 
                                                ShowFooter="True" Width="100%" >
                                                <Columns>
                                                    <asp:BoundField DataField="key" HeaderText="ACTIVOS">
                                                        <HeaderStyle HorizontalAlign="Left" />
                                                        <ItemStyle VerticalAlign="Top" Width="150px" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" BackColor="White"
                                                                BorderColor="#c9ccd3" BorderStyle="None" BorderWidth="1px" CellPadding="3" ShowFooter="True"
                                                                GridLines="Horizontal" Width="100%">
                                                                <Columns>
                                                                    <asp:TemplateField>
                                                                        <HeaderTemplate>
                                                                            <asp:Label ID="lblHeader" runat="server" Text="Descripción"></asp:Label>
                                                                        </HeaderTemplate>
                                                                        <ItemTemplate>
                                                                            <div class="group">
                                                                                <span>
                                                                                    <%#Eval("Descripcion")%>
                                                                                </span>
                                                                            </div>
                                                                            <div class="order" style="position: absolute; display: none; z-index: 1000;">
                                                                                <!-- Main Container -->
                                                                                <div class="container">
                                                                                    <!-- Container Head -->
                                                                                    <div class="container_head">
                                                                                        <img src="img/sidebar_left.jpg" alt="" class="float_left" />
                                                                                        <img src="img/sidebar_right.jpg" alt="" class="float_right" />
                                                                                        <div class="container_head_text">
                                                                                            Detalle
                                                                                        </div>
                                                                                    </div>
                                                                                    <!-- Container Content -->
                                                                                    <div class="container_content">
                                                                                        <ul>
                                                                                            <li><strong>Descripción:</strong>  <%#Eval("Descripcion")%></li>
                                                                                            <li><strong>Instrumento:</strong>  <%#Eval("TipoDeInstrumento")%> </li>
                                                                                            <li><strong>Divisa:</strong>  <%#Eval("DivisaPosicion")%> </li>
                                                                                            <li><strong>Cantidad: </strong> <%#Eval("Cantidad", "{0:n}")%> </li>
                                                                                            <li><strong>Precio de Mercado:</strong>  <%#Eval("PrecioMercado", "{0:n}")%> </li>
                                                                                            <li><strong>Costo de Adquisición: </strong> <%#Eval("CostoAdquisicion", "{0:n}")%> </li>
                                                                                            <li><strong>Valor de Mercado:</strong>  <%#Eval("ValorPosicionBase", "{0:n}")%> </li>
                                                                                            <li><strong>Tasa de Cambio:</strong>  <%#Eval("TasaDeCambioABase", "{0:n}")%> </li>
                                                                                        </ul>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle  Width="200px" VerticalAlign="Top"/>
                                                                    </asp:TemplateField>
                                                                    <asp:BoundField DataField="Valor" HeaderText="Código" SortExpression="Valor">
                                                                        <HeaderStyle HorizontalAlign="Left"  Width="150px" />
                                                                        <ItemStyle VerticalAlign="Top" Width="150px" />
                                                                    </asp:BoundField>
                                                                    <asp:BoundField DataField="DivisaPosicion" HeaderText="Divisa" 
                                                                        SortExpression="DivisaPosicion">
                                                                        <HeaderStyle HorizontalAlign="Left" Width="50px"/>
                                                                        <ItemStyle VerticalAlign="Top" Width="50px"/>
                                                                    </asp:BoundField>
                                                                    <asp:TemplateField>
                                                                        <HeaderTemplate>
                                                                            <asp:Label ID="lblHeader2" runat="server" Text="Valor"></asp:Label>
                                                                        </HeaderTemplate>
                                                                        <ItemTemplate>
                                                                            <div class="group">
                                                                                <span>
                                                                                    <%#Eval("ValorPosicionBase", "{0:n}")%>
                                                                                </span>
                                                                            </div>
                                                                            <div class="order" style="position: absolute; display: none; z-index: 1000" 
                                                                                align ="left">
                                                                                <!-- Main Container -->
                                                                                <div class="container"  align ="left">
                                                                                    <!-- Container Head -->
                                                                                    <div class="container_head"  align ="left">
                                                                                        <img src="img/sidebar_left.jpg" alt="" class="float_left" />
                                                                                        <img src="img/sidebar_right.jpg" alt="" class="float_right" />
                                                                                        <div class="container_head_text">
                                                                                            Detalle
                                                                                        </div>
                                                                                    </div>
                                                                                    <!-- Container Content -->
                                                                                    <div class="container_content"  align ="left">
                                                                                        <ul>
                                                                                            <li><strong>Cantidad:</strong> <%#Eval("Cantidad", "{0:n}")%></li>
                                                                                            <li><strong>Precio:</strong>  <%#Eval("PrecioMercado", "{0:n}")%></li>
                                                                                            <li><strong>Monto:</strong>  <%#Eval("ValorPosicion", "{0:n}")%> </li>
                                                                                            <li><strong>Intereses:</strong>  <%#Eval("InteresesCausados", "{0:n}")%> </li>                                                                                            
                                                                                            <li><strong>Monto en divisa:</strong>  <%#Eval("MontoEnDivisa", "{0:n}")%> </li>
                                                                                            <li><strong>Tasa de cambio:</strong>  <%#Eval("TasaDeCambioABase", "{0:n}")%> </li>
                                                                                            <li><strong>Monto base:</strong>  <%#Eval("ValorPosicionBase", "{0:n}")%> </li>
                                                                                            <hr />
                                                                                            <li><strong>Costo de adquisición:</strong>  <%#Eval("CostoAdquisicion", "{0:n}")%> </li>
                                                                                            <li><strong>Valor de adquisición:</strong>  <%#Eval("ValorAdquisicion", "{0:n}")%> </li>
                                                                                            <li><strong>Utilidad no realizada:</strong>  <%#Eval("UtilidadNoRealizada", "{0:n}")%> </li>
                                                                                            
                                                                                        </ul>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <HeaderStyle HorizontalAlign="right"  Width="100px"/>
                                                                        <ItemStyle VerticalAlign="Top" Width="100px" HorizontalAlign="right" />
                                                                        <FooterStyle HorizontalAlign="Right" />
                                                                    </asp:TemplateField>
                                                                    <asp:BoundField DataField="PorcentajeDelActivo" HeaderText="%" DataFormatString="{0:n}"
                                                                        SortExpression="PorcentajeDelActivo">
                                                                        <HeaderStyle HorizontalAlign="right"  Width="80px"/>
                                                                        <ItemStyle VerticalAlign="Top" HorizontalAlign="right" Width="80px"/>
                                                                        <FooterStyle HorizontalAlign="Right" />
                                                                    </asp:BoundField>
                                                                    <asp:HyperLinkField  NavigateUrl="~/PrincipalExterno.aspx" >   
                                                                        <HeaderStyle Width="50px" />                                                                
                                                                        <ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="50px"/>
                                                                        <FooterStyle  Width="50px"/>
                                                                    </asp:HyperLinkField>
                                                                </Columns>
                                                                <FooterStyle CssClass="GridViewFooterStyle" />
                                                                <HeaderStyle CssClass="GridViewHeaderStyle" />
                                                                <PagerStyle CssClass="GridViewPagerStyle" />
                                                                <RowStyle CssClass="GridViewRowStyle" />
                                                                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                                                <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                                                            </asp:GridView>
                                                        </ItemTemplate>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle VerticalAlign="Top" />
                                                    </asp:TemplateField>                                                                                                       
                                                </Columns>
                                                <FooterStyle CssClass="GridViewFooterStyle" />
                                                <HeaderStyle CssClass="GridViewHeaderStyle" />
                                                <PagerStyle CssClass="GridViewPagerStyle" />
                                                <RowStyle CssClass="GridViewRowStyle" />
                                                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                                <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                                            </asp:GridView>
                                            <br />
                                            <asp:GridView ID="gvPasivos" runat="server" AllowSorting="True" 
                                                AutoGenerateColumns="False" BackColor="White" BorderColor="#c9ccd3" 
                                                BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Horizontal"
                                                ShowFooter="True" 
                                                Width="100%">
                                                <Columns>
                                                    <asp:BoundField DataField="key" HeaderText="PASIVOS">
                                                    <HeaderStyle HorizontalAlign="Left" />
                                                    <ItemStyle VerticalAlign="Top" Width="150px" />
                                                    </asp:BoundField>
                                                    <asp:TemplateField>
                                                        <ItemTemplate>
                                                            <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                                                                BackColor="White" BorderColor="#c9ccd3" BorderStyle="None" BorderWidth="1px" 
                                                                CellPadding="3" GridLines="Horizontal" ShowFooter="True" Width="100%">
                                                                <Columns>
                                                                    <asp:TemplateField>
                                                                        <HeaderTemplate>
                                                                            <asp:Label ID="lblHeader0" runat="server" Text="Descripción"></asp:Label>
                                                                        </HeaderTemplate>
                                                                        <ItemTemplate>
                                                                            <div class="group">
                                                                                <span><%#Eval("Descripcion")%></span>
                                                                            </div>
                                                                            <div class="order" style="position: absolute; display: none; z-index: 1000;">
                                                                                <!-- Main Container -->
                                                                                <div class="container">
                                                                                    <!-- Container Head -->
                                                                                    <div class="container_head">
                                                                                        <img src="img/sidebar_left.jpg" alt="" class="float_left" />
                                                                                        <img src="img/sidebar_right.jpg" alt="" class="float_right" />
                                                                                        <div class="container_head_text">
                                                                                            Detalle
                                                                                        </div>
                                                                                    </div>
                                                                                    <!-- Container Content -->
                                                                                    <div class="container_content">
                                                                                        <ul>
                                                                                            <li><strong>Descripción:</strong> <%#Eval("Descripcion")%></li>
                                                                                            <li><strong>Instrumento:</strong> <%#Eval("TipoDeInstrumento")%></li>
                                                                                            <li><strong>Divisa:</strong> <%#Eval("DivisaPosicion")%></li>
                                                                                            <li><strong>Cantidad: </strong><%#Eval("Cantidad", "{0:n}")%></li>
                                                                                            <li><strong>Precio de Mercado:</strong> <%#Eval("PrecioMercado", "{0:n}")%></li>
                                                                                            <li><strong>Costo de Adquisición: </strong><%#Eval("CostoAdquisicion", "{0:n}")%></li>
                                                                                            <li><strong>Valor de Mercado:</strong> <%#Eval("ValorPosicionBase", "{0:n}")%></li>
                                                                                            <li><strong>Tasa de Cambio:</strong> <%#Eval("TasaDeCambioABase", "{0:n}")%></li>
                                                                                        </ul>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <ItemStyle VerticalAlign="Top" Width="200px" />
                                                                    </asp:TemplateField>
                                                                    <asp:BoundField DataField="Valor" HeaderText="Código" SortExpression="Valor">
                                                                    <HeaderStyle HorizontalAlign="Left" Width="150px" />
                                                                    <ItemStyle VerticalAlign="Top" Width="150px" />
                                                                    </asp:BoundField>
                                                                    <asp:BoundField DataField="DivisaPosicion" HeaderText="Divisa" 
                                                                        SortExpression="DivisaPosicion">
                                                                    <HeaderStyle HorizontalAlign="Left" Width="50px" />
                                                                    <ItemStyle VerticalAlign="Top" Width="50px" />
                                                                    </asp:BoundField>
                                                                    <asp:TemplateField>
                                                                        <HeaderTemplate>
                                                                            <asp:Label ID="lblHeader1" runat="server" Text="Valor"></asp:Label>
                                                                        </HeaderTemplate>
                                                                        <ItemTemplate>
                                                                            <div class="group">
                                                                                <span><%#Eval("ValorPosicionBase", "{0:n}")%></span>
                                                                            </div>
                                                                            <div align="left" class="order" 
                                                                                style="position: absolute; display: none; z-index: 1000">
                                                                                <!-- Main Container -->
                                                                                <div align="left" class="container">
                                                                                    <!-- Container Head -->
                                                                                    <div align="left" class="container_head">
                                                                                        <img src="img/sidebar_left.jpg" alt="" class="float_left" />
                                                                                        <img src="img/sidebar_right.jpg" alt="" class="float_right" />
                                                                                        <div class="container_head_text">
                                                                                            Detalle
                                                                                        </div>
                                                                                    </div>
                                                                                    <!-- Container Content -->
                                                                                    <div align="left" class="container_content">
                                                                                        <ul>
                                                                                            <li><strong>Cantidad:</strong> <%#Eval("Cantidad", "{0:n}")%></li>
                                                                                            <li><strong>Precio:</strong> <%#Eval("PrecioMercado", "{0:n}")%></li>
                                                                                            <li><strong>Monto:</strong> <%#Eval("ValorPosicion", "{0:n}")%></li>
                                                                                            <li><strong>Intereses:</strong> <%#Eval("InteresesCausados", "{0:n}")%></li>
                                                                                            <li><strong>Monto en divisa:</strong> <%#Eval("MontoEnDivisa", "{0:n}")%></li>
                                                                                            <li><strong>Tasa de cambio:</strong> <%#Eval("TasaDeCambioABase", "{0:n}")%></li>
                                                                                            <li><strong>Monto base:</strong> <%#Eval("ValorPosicionBase", "{0:n}")%></li>
                                                                                            <hr />
                                                                                            <li><strong>Costo de adquisición:</strong> <%#Eval("CostoAdquisicion", "{0:n}")%></li>
                                                                                            <li><strong>Valor de adquisición:</strong> <%#Eval("ValorAdquisicion", "{0:n}")%></li>
                                                                                            <li><strong>Utilidad no realizada:</strong> <%#Eval("UtilidadNoRealizada", "{0:n}")%>
                                                                                            </li>
                                                                                        </ul>
                                                                                    </div>
                                                                                </div>
                                                                            </div>
                                                                        </ItemTemplate>
                                                                        <HeaderStyle HorizontalAlign="right" Width="100px" />
                                                                        <ItemStyle HorizontalAlign="right" VerticalAlign="Top" Width="100px" />
                                                                        <FooterStyle HorizontalAlign="Right" />
                                                                    </asp:TemplateField>
                                                                    <asp:BoundField DataField="PorcentajeDelActivo" DataFormatString="{0:n}" 
                                                                        HeaderText="%" SortExpression="PorcentajeDelActivo">
                                                                    <HeaderStyle HorizontalAlign="right" Width="80px" />
                                                                    <ItemStyle HorizontalAlign="right" VerticalAlign="Top" Width="80px" />
                                                                    <FooterStyle HorizontalAlign="Right" />
                                                                    </asp:BoundField>
                                                                    <asp:HyperLinkField NavigateUrl="~/PrincipalExterno.aspx">
                                                                    <HeaderStyle Width="50px" />
                                                                    <ItemStyle HorizontalAlign="Right" VerticalAlign="Top" Width="50px" />
                                                                    <FooterStyle Width="50px" />
                                                                    </asp:HyperLinkField>
                                                                </Columns>
                                                                <FooterStyle CssClass="GridViewFooterStyle" />
                                                                <HeaderStyle CssClass="GridViewHeaderStyle" />
                                                                <PagerStyle CssClass="GridViewPagerStyle" />
                                                                <RowStyle CssClass="GridViewRowStyle" />
                                                                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                                                <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                                                            </asp:GridView>
                                                        </ItemTemplate>
                                                        <FooterStyle HorizontalAlign="Right" />
                                                        <ItemStyle VerticalAlign="Top" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <FooterStyle CssClass="GridViewFooterStyle" />
                                                <HeaderStyle CssClass="GridViewHeaderStyle" />
                                                <PagerStyle CssClass="GridViewPagerStyle" />
                                                <RowStyle CssClass="GridViewRowStyle" />
                                                <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                                                <SelectedRowStyle CssClass="GridViewSelectedRowStyle" />
                                            </asp:GridView>
                                        </td>
                                    </tr>
                                </table>
                                 </td>
                                    </tr>
                                </table>
                            
